package org.ww.seckill.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.ww.seckill.interceptor.SeckillLoginInterceptor;

/**
 * @program: gmall
 * @description: config
 * @author: ww
 * @create: 2024-05-24 15:50
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private SeckillLoginInterceptor seckillLoginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(seckillLoginInterceptor).addPathPatterns("/**");
    }
}
